package com.todo.sight.application.iface.backend.request;

import com.todo.common.common.entity.CurrentStaff;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author zhangwenxiang
 * @date 2024/3/17 15:31
 * @description
 */
@Data
@Schema(title = "更新城市信息入参", description = "更新城市信息入参")
public class UpdateCityInfoReq {

    private CurrentStaff _staff;
    /**
     * 主键id
     */
    @Schema(title = "主键id", description = "主键id")
    private Long id;
    /**
     * 名称
     */
    @Schema(title = "名称", description = "名称")
    private String name;
    /**
     * 类型：省、市、区等
     * CityTypeEnum
     */
    @Schema(title = "类型", description = "省、市、区等")
    private Integer type;
    /**
     * 父id
     */
    @Schema(title = "父id", description = "父id")
    private Long parentId;
    /**
     * 别名
     */
    @Schema(title = "别名", description = "别名")
    private String otherName;
    /**
     * 主图
     */
    @Schema(title = "主图", description = "主图")
    private String mainImg;
    /**
     * 描述
     */
    @Schema(title = "描述", description = "描述")
    private String desc;
    /**
     * 是否对外展示
     */
    @Schema(title = "是否对外展示", description = "是否对外展示")
    private Integer isShow;

    public boolean baseCheck() {
        if (id == null || StringUtils.isBlank(name) || type == null || StringUtils.isBlank(otherName) || StringUtils.isBlank(desc) || isShow == null) {
            return false;
        }
        return true;
    }
}
